package com.sx.basic.exception;

/**
 * @author AdinZ
 * @date 2020/5/7 8:17 下午
 */
public class BasicException extends RuntimeException {

    private final int code;

    public BasicException(int code, String message, Throwable cause){
        super(message,cause);
        this.code=code;
    }

    public BasicException(String message) {
        this(500,message,null);
    }

    public BasicException(String message,Throwable cause){
        this(500,message,cause);
    }
    public BasicException(int code,String message){
        this(code,message,null);
    }

    public int getCode() {
        return code;
    }
}
